Checksum 2.0, coming soon..
After "The Loss", of which we shall not speak, I didn't think I'd ever see checksum's code again.Then came AI.
A job which would have taken me a painful month or more and I wouldn't even bother starting has been reduced to a couple of days with my local AI, along with help from the odd frontier model when the local agent was busy.
In short, I can see the code again. w00h00!1
Yes decades have passed, and it still works great, but the bottom line is, I backed the loser, Blake2; politics or something got involved and SHA256 won and got baked into our actual hardware, meaning using it to hash files is FAST AF.
Replacing Blake2s with SHA256 seems like a no-brainer now, and something I've been thinking checksum should be doing, for quite a while2.
I'm a bit sad to see the cryptographically-superior (I remember thinking at the time) Blake go, but happy to shave heaps of CPU energy and time off hashing files; checksum's hash.dll, while still faster than Windows built-in bcrypt.dll (in the two algorithms they share; MD5 and SHA1), can't begin to keep up with modern hardware-accelerated computations of SHA256 (and only SHA256, btw)..
10.15GB test file:
old checksum hash64.dll (SHA1) = 13.9s (now faster than MD5 on my modern hardware ~ 16.5s)
Windows cryptutil (SHA256) = 9.5s
the new bcrypt.dll routines in checksum (SHA256) = 6.7s
Basically half. I want to insert this efficiency into the brain of checksum. And I'm working on it right now, also Open Sourcing the code, so you can have fun with it.
I have also got back simple checksum, checksum's wee brother, and he is the first to take the plunge; the SHA256 hashing is working great. There's still a few things to do yet, but expect a taster binary soon.
checksum itself will take a little longer to whip into SHA256 shape. Also I still need to wipe and upgrade the actual server all this lives on3, and also it's Summer Holidays right now and the garden has many time-sensitive needs, as do the kids, so..
Now you at least know the plan.
For now..
;o)
1.7.5.21
* Incorporated a facility to upgrade legacy MD5 & SHA1 hashes to SHA256.
I used my local Qwen 27B to come up with the basic structure, which I
then tore apart. Hey, it was better than the bollocks Qwen 35B-A3B
assured me was good code, it was not. We humans think of things AI
simply doesn't. But once you have that, AI can be useful and is cheaper
than a paid intern; I used Gemini to help me track down the bugs and
find inefficiencies. So far; good work.
The command-line switch is simply "upgrade", and I've created a couple
of Windows registry scripts you can use to add and remove extra Explorer
context commands for upgrading hashes (one to add the entries and
another to remove the entries if/when you no longer need them).
There is no facility to upgrade Blake2s hashes as they look identical
to SHA256 hashes, which we skip during hash upgrade. Sorry Blake2 users!
That's a can of worms I wasn't gonna open. Fortunately most folk use the
fastest algorithm which was always either MD5 or SHA1, until SHA256 came
along and got integrated into hardware.
** If you do use Blake2s, I would simply verify all hash files then
delete and recreate with SHA256; similar security but *much* faster.
During the upgrade, old hash files are interrogated; their hashes
verified; and on success, the algorithm is recomputed using SHA256.
checksum can upgrade all MD5 and SHA1 hashes to SHA256 as-it-goes,
meaning all .md5, .sha1, .sfv and UNIX MD5* files get re-computed and
their extensions switched to .sha2. All the usual formats are supported.
* whatever is set in your ini, e.g. "md5sums.txt"
If there are any issues during the upgrade process, a log will be
created in the working directory (unless you have a fixed log path
configured). You can work on files, directories, trees and volumes. The
final dialog has useful information.
As I run the upgrade over my own hash files I realise it's also a fine
excuse to /check/ all my files, which is happening automatically as
checksum works, a two-for-one!
NOTE: RESUME IS SUPPORTED. If checksum gets interrupted during an
upgrade operation, it leaves behind a temp file. If that temp file is
present when you begin an upgrade, checksum picks up from where it left
off. This is especially useful for BIG hash files spanning TBs of data.
It also creates a .bak of your checksum file for the moments it's
replacing your hash file, for extra redundancy in case something
*unforseen* happens. I'm fairly sure I have your old hash data covered.
1.7.4.10
* Thanks to the wonders of AI, I have resurrected checksum!
Not saying it wasn't a lot of work, but it became /doable/, which it
previously was not, at least by me alone in the time I get.
So, thank you AI!
This also means all the things that I've considered checksum should or
shouldn't be doing, in the last ten years, have a chance to get done, or
not done! But, you know, DONE! Expect a few changes, features and fixes
in the next wee while.
I'll get a beta up ASAP so you can help me track down all the new bugs!
Here goes..
* Removed hash.dll dependency.
Still the fastest MD5 hashing, but there is no good reason to use MD5.
* Replaced Blake2s hashing with SHA256 hashing.
We are using Windows' built-in bcrypt.dll for hashing now, so it should
keep up-to-date with any underlying hardware improvements, but no BLAKE.
checksum's routines have faster throughput than Windows' cryptutil and
of course utilize your underlying hardware's SHA256 capabilities,
meaning SHA256 is now *way* faster than even MD5 ever was.
~ As SHA2 is now the default hashing method, if you require MD5, you will
need to ask for it by either setting that as your default inside
checksum.ini, choosing that in the options dialog, or adding a "5" to
your command-line switches.
The switch for SHA2 hashing is "2", but if it's your default, you won't
need to add it unless selecting SHA2 as the algorithm for applicable
operations, e.g. "a2" for verifying only SHA2 hashes.
~ As well as making checksum more lightweight, it makes checksum much more
responsive during hashing operations (the old DLL was so fast partly
because it hogged your CPU and ignored all input except Pause/Break).
You will find things like moving and toggling the tooltip a /lot/
easier.
Pause/Break still shows the abort dialog.
* SHA256 is now the default hashing algorithm.
* The HTML logging is now HTML5 (previously it was XHTML4.0).
* Added UP handling inside hash files, so ..\some.file will now work as
expected. You can hash FitGirl releases directly!
* Removed the shaky, undocumented tar.md5 support. Oh, you didn't know
about that? Hah!
references:
1. Due to my stupid obfuscation of the original code in the apps, many of the de-obfuscated variable and function names are, well, sub-optimal. This will take time to remedy, if I can be bothered. A few at a time, probably.
2. I have no plans to include an --upgrade-hashes flag or separate app for Blake2s hashes. checksum is making a clean break. If I used Blake I'd verify all my own hashes, delete all .hash files, and re-hash everything with the new version, once it's ready. If you use Blake hashes, you can figure out your own strategy!
3.The new-and-improved, php8-capable corz.org is currently running on a test server as I work on it, bit-at-a-time. If you want to test it out, or have a nice agent script for this, get in touch.
2. I have no plans to include an --upgrade-hashes flag or separate app for Blake2s hashes. checksum is making a clean break. If I used Blake I'd verify all my own hashes, delete all .hash files, and re-hash everything with the new version, once it's ready. If you use Blake hashes, you can figure out your own strategy!
3.The new-and-improved, php8-capable corz.org is currently running on a test server as I work on it, bit-at-a-time. If you want to test it out, or have a nice agent script for this, get in touch.